package mr.ali.video.web.controller;


import mr.ali.video.web.Exception.R;
import mr.ali.video.web.model.CollectionAlpay;
import mr.ali.video.web.service.ICollectionAlpayService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author Mr-ali
 * @since 2025-08-03
 */
@RestController
@RequestMapping("/web/collectionAlpay")
public class CollectionAlpayController {
    @Resource
    private ICollectionAlpayService collectionAlpayService;

    @GetMapping("/getAlpay")
    public List<CollectionAlpay> getAlpay() {
        return collectionAlpayService.getAlpay();
    }
    @GetMapping("/updateDisplayed")
    public R<Integer> updateDisplayed(Integer id, Integer displayed) {
        return R.ok(collectionAlpayService.updateDisplayed(id, displayed));
    }
    @GetMapping("/updateAlpayName")
    public R<Integer> updateAlpayName(CollectionAlpay alpay) {
        return R.ok(collectionAlpayService.updateAlpayName(alpay));
    }
}
